/*
 *   Copyright (C) Key Bridge Global LLC and/or its affiliates.
 *
 *   This program is free software: you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation, either version 3 of the License, or
 *   (at your option) any later version.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
package com.keybridgeglobal.wsif.enumerated;

import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue;
import javax.xml.bind.annotation.XmlType;

/**
 * <p>Java class for enumMacAlgorithm.
 * <p/>
 * <p>The following schema fragment specifies the expected content contained
 * within this class. <p>
 * <pre>
 * &lt;simpleType name="enumMacAlgorithm">
 *   &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
 *     &lt;enumeration value="HmacMD5"/>
 *     &lt;enumeration value="HmacSHA1"/>
 *     &lt;enumeration value="HmacSHA256"/>
 *     &lt;enumeration value="HmacSHA384"/>
 *     &lt;enumeration value="HmacSHA512"/>
 *     &lt;enumeration value="PBEWithHmacMD5"/>
 *     &lt;enumeration value="PBEWithHmacSHA1"/>
 *     &lt;enumeration value="PBEWithHmacSHA256"/>
 *     &lt;enumeration value="PBEWithHmacSHA384"/>
 *     &lt;enumeration value="PBEWithHmacSHA512"/>
 *   &lt;/restriction>
 * &lt;/simpleType>
 * </pre>
 * <p/>
 */
@XmlType(name = "enumMacAlgorithm")
@XmlEnum
public enum EnumMacAlgorithm {

  @XmlEnumValue("HmacMD5")
  HMAC_MD_5("HmacMD5"),
  @XmlEnumValue("HmacSHA1")
  HMAC_SHA_1("HmacSHA1"),
  @XmlEnumValue("HmacSHA256")
  HMAC_SHA_256("HmacSHA256"),
  @XmlEnumValue("HmacSHA384")
  HMAC_SHA_384("HmacSHA384"),
  @XmlEnumValue("HmacSHA512")
  HMAC_SHA_512("HmacSHA512"),
  @XmlEnumValue("PBEWithHmacMD5")
  PBE_WITH_HMAC_MD_5("PBEWithHmacMD5"),
  @XmlEnumValue("PBEWithHmacSHA1")
  PBE_WITH_HMAC_SHA_1("PBEWithHmacSHA1"),
  @XmlEnumValue("PBEWithHmacSHA256")
  PBE_WITH_HMAC_SHA_256("PBEWithHmacSHA256"),
  @XmlEnumValue("PBEWithHmacSHA384")
  PBE_WITH_HMAC_SHA_384("PBEWithHmacSHA384"),
  @XmlEnumValue("PBEWithHmacSHA512")
  PBE_WITH_HMAC_SHA_512("PBEWithHmacSHA512");
  private final String value;

  EnumMacAlgorithm(String v) {
    value = v;
  }

  public String value() {
    return value;
  }

  public static EnumMacAlgorithm fromValue(String v) {
    for (EnumMacAlgorithm c : EnumMacAlgorithm.values()) {
      if (c.value.equals(v)) {
        return c;
      }
    }
    throw new IllegalArgumentException(v);
  }
}
